FROM kalilinux/kali-rolling:latest

LABEL maintainer="hamflx <a@hamflx.cn>"

# 构建说明
#
#   docker build --build-arg HTTPS_PROXY=<proxy> --network host -t kali .
#
#   使用 --build-arg 指定 HTTPS 代理，以下载最新数据库，否则下载将会非常缓慢
#   若代理为宿主机，与 --network host 搭配使用，否则容器将无法访问宿主机

WORKDIR /root

COPY words ./words

RUN apt-get update
RUN apt-get install -y --no-install-recommends --no-install-suggests \
        file \
        vim \
        less \
        zip \
        git \
        iproute2 \
        iputils-ping \
        net-tools \
        netcat \
        curl \
        proxychains \
        exploitdb \
        sqlmap \
        nmap \
        msfpc \
        metasploit-framework

# Install nmap-vulners
RUN git clone --depth=1 --branch=master https://github.com/vulnersCom/nmap-vulners.git /usr/share/nmap/scripts/nmap-vulners
# Install vulscan
RUN git clone --depth=1 --branch=master https://github.com/scipag/vulscan.git /usr/share/nmap/scripts/vulscan

# # Update database
RUN curl -L -o /usr/share/nmap/scripts/vulscan/cve.csv https://www.computec.ch/projekte/vulscan/download/cve.csv
RUN curl -L -o /usr/share/nmap/scripts/vulscan/exploitdb.csv https://www.computec.ch/projekte/vulscan/download/exploitdb.csv
RUN curl -L -o /usr/share/nmap/scripts/vulscan/openvas.csv https://www.computec.ch/projekte/vulscan/download/openvas.csv
RUN curl -L -o /usr/share/nmap/scripts/vulscan/osvdb.csv https://www.computec.ch/projekte/vulscan/download/osvdb.csv
RUN curl -L -o /usr/share/nmap/scripts/vulscan/scipvuldb.csv https://www.computec.ch/projekte/vulscan/download/scipvuldb.csv
RUN curl -L -o /usr/share/nmap/scripts/vulscan/securityfocus.csv https://www.computec.ch/projekte/vulscan/download/securityfocus.csv
RUN curl -L -o /usr/share/nmap/scripts/vulscan/securitytracker.csv https://www.computec.ch/projekte/vulscan/download/securitytracker.csv
RUN curl -L -o /usr/share/nmap/scripts/vulscan/xforce.csv https://www.computec.ch/projekte/vulscan/download/xforce.csv
